import java.util.StringTokenizer;


class P105_39643 {

	static int[] skyline = new int[10000];
	

	public static void main(String[] args) {

		String line = readLn();
		
		while (line != null) {
			read(line);
			
			line = readLn();
		}
		
//		for (int k = 0; k < 8; k++)
//			System.out.print(skyline[k] + " ");
//		
//		System.out.println();
		
		process();
		
	}
	
	 private static void process() {
		StringBuffer sb = new StringBuffer();
		int previous = 0;
		 
		for (int k = 0; k < skyline.length; k++) {
			if (skyline[k] != previous) {
				sb.append(/*(previous < skyline[k] ?*/ k /*: k - 1 )*/+ " " + skyline[k] + " ");
				previous = skyline[k];
			}
		}
		
		System.out.println(sb.toString().trim());
	}

	private static void read(String line) {
		StringTokenizer st = new StringTokenizer(line);
		int init = Integer.parseInt(st.nextToken());
		int height = Integer.parseInt(st.nextToken());
		int end = Integer.parseInt(st.nextToken());
		
//		for (int k = 0; k < 8; k++)
//			System.out.print(skyline[k] + " ");
//		
//		System.out.println();
//		
		for (int k = init; k < end; k++) {
			if (height > skyline[k]) {
				skyline[k] = height;
			}
		}
		
	}

	static String readLn() {
	       String newLine = System.getProperty("line.separator");
	       StringBuffer buffer = new StringBuffer();
	       int car = -1;
	       try {
	           car = System.in.read();
	           while ((car > 0) && (car != newLine.charAt(0))) {
	               buffer.append((char)car);
	               car = System.in.read();
	           }
	           if (car == newLine.charAt(0))
	           System.in.skip(newLine.length() - 1);
	       } catch (java.io.IOException e) { return (null);}
	       if ((car < 0) && (buffer.length() == 0)) return (null);
	      return (buffer.toString()).trim();
	 }
}
